﻿using Mate.Db.Model.Users;
using Mate.Db.SqlSugar;
using Mate.Dto.Users;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mate.User.Service
{
    public interface IAdminUserService:IDataService<admin_user>
    {
        /// <summary>
        /// 获取当前登录用户
        /// </summary>
        /// <returns></returns>
        admin_user CurrentAdminUser(int userId);

        /// <summary>
        /// 根据用户名密码获取
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        admin_user GetByUserNameAndPwd(string userName, string password);

        /// <summary>
        /// 更新最后登录时间
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <returns></returns>
        bool UpdateLastLoginTime(int id);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="Key">用户名,电话</param>
        /// <param name="status">状态</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="recordCount">总条数</param>
        /// <returns></returns>
        IList<AdminUserModel> GetList(int pageIndex, int pageSize, string Key, ref int recordCount);
    }
}
